#include <algorithm>
#include <cstdio>

const int N = 500005;
int n, ans, max, a[N], f[N], g[N], k[N];

int main() {
#ifndef ONLINE_JUDGE
#ifdef LOCAL
  freopen("testdata.in", "r", stdin);
  freopen("testdata.out", "w", stdout);
#else
  freopen("point.in", "r", stdin);
  freopen("point.out", "w", stdout);
#endif
#endif

  scanf("%d", &n);
  ans = n;
  for (int i = 1; i <= n; ++i) { scanf("%d", &a[i]), f[i] = i, g[i] = i; }
  for (int i = 1; i <= n; ++i) {
    while (f[i] != 1 && a[f[i] - 1] % a[i] == 0) f[i] = f[f[i] - 1];
  }
  for (int i = n; i; --i) {
    while (g[i] != n && a[g[i] + 1] % a[i] == 0) g[i] = g[g[i] + 1];
  }
  for (int i = 1; i <= n; ++i) {
    if (g[i] - f[i] == max) k[++ans] = f[i];
    if (g[i] - f[i] > max) k[ans = 1] = f[i], max = g[i] - f[i];
  }
  std::sort(k + 1, k + ans + 1);
  ans = std::unique(k + 1, k + ans + 1) - k - 1;
  printf("%d %d\n", ans, max);
  for (int i = 1; i <= ans; ++i) printf("%d ", k[i]);
  return 0;
}